import axios from "axios";
import qs from "qs";

let http = axios.create({
    baseURL: "https://cnodejs.org/api/v1",
});

const api = {
    topics: (page = 1, tab = "all", limit = 10) => {
        return http.get(`topics?` + qs.stringify({ page, tab, limit }));
    },
};

export default api;
